package com.flute.tools.word;

import java.util.Hashtable;

public class SourceManager {
	private Hashtable<String, InformationSource> table;
	private static SourceManager instance;

	private SourceManager() {
		this.table = new Hashtable<String, InformationSource>();
	}

	public synchronized static SourceManager getInstance() {
		if (instance == null) {
			instance = new SourceManager();
		}

		return instance;
	}

	public synchronized InformationSource getSource(String source) {
		if (!table.containsKey(source)) {
			table.put(source, new InformationSource(source));
		}

		return table.get(source);
	}
}
